package com.serialPort.common.utils;

import org.apache.http.client.methods.*;

/**
 * 创建httpclent对象
 */
public class HttpClientUtils {

    /**
     * http的post请求
     *
     * @param url
     * @return
     */
    public static HttpPost createHttpPost(String url) {
        return new HttpPost(url);
    }

    /**
     * http的put请求
     *
     * @param url
     * @return
     */
    public static HttpPut createHttpPut(String url) {
        return new HttpPut(url);
    }


    /**
     * http的delete请求
     *
     * @param url
     * @return
     */
    public static HttpDelete createHttpDelete(String url) {
        return new HttpDelete(url);
    }


    /**
     * http的get请求
     *
     * @param url
     * @return
     */
    public static HttpGet createHttpGet(String url) {
        return new HttpGet(url);
    }
}
